namespace utils {
	/**
	 * 获得函数名称(可以获得对象的类名称)
	 * @param:func {Function} 函数
	 * @return {string} 函数名称
	 */
	export function funcName(func: Function): string {
		if (isFunc(func)) return func['name'] || /function (.+?)\(/.exec(this.constructor + "")[1];
		else return '';
	}

	let _bingo = undefined;
	export function bingo(value: any, condition?: boolean): any {
		if (isBoolean(condition)) {
			if (_bingo === undefined && condition) _bingo = value;
			return utils;
		} else {
			_bingo = undefined;
			return value;
		}
	}

	// export function hasFunc(obj: Object, name: string): boolean {
	// 	return !!obj && isFunc(obj[name]);
	// }

	// export function doFunc(obj: Object, name: string, ...params: any[]): any {
	// 	if (hasFunc(obj, name)) {
	// 		let func = obj[name] as Function;
	// 		return Reflect.apply(func, obj, params);
	// 	} else return null;
	// }
}